package com.huarui.market.dao.impl;

import java.util.List;
import java.util.Map;

import org.ewaf.framework.dao.impl.BaseDaoImpl;

import com.huarui.market.dao.IMarketDao;
import com.huarui.market.model.Market;

public class MarketDaoImpl extends BaseDaoImpl implements IMarketDao{

	@Override
	@SuppressWarnings("unchecked")
	public List<Map<String, Object>> getMarketListByComplex(
			Map<String, Object> paramsMap) {
		return this.getSqlMapClientTemplate().queryForList(super.namespace + ".getMarketListByComplex", paramsMap);
	}

	@Override
	public Integer getMarketListCountByComplex(Map<String, Object> paramsMap) {
		return (Integer) this.getSqlMapClientTemplate().queryForObject(super.namespace + ".getMarketListCountByComplex", paramsMap);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Map<String, Object>> getMarketCombox(
			Map<String, Object> paramsMap) {
		return  this.getSqlMapClientTemplate().queryForList(super.namespace + ".getMarketCombox", paramsMap);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Market> getMarketByMarketType(Integer marketType) {
		
		return getSqlMapClientTemplate().queryForList(namespace+".getMarketByMarketType", marketType);
	}

	@Override
	public Market getMarketByCompanyId(Integer companyId) {
		return (Market) getSqlMapClientTemplate().queryForObject(namespace+".getMarketByCompanyId", companyId);
		 
	 }

}
